﻿package manager
{
    import com.sh.game.consts.*;
    import com.sh.game.net.*;
    import plugin.NewSkill.handler.*;
    import plugin.accomplishment.handler.*;
    import plugin.activity.handler.*;
    import plugin.bagN.handler.*;
    import plugin.bossChallenge.handler.*;
    import plugin.business.handler.*;
    import plugin.chatflash.handler.*;
    import plugin.duanzao.handler.*;
    import plugin.emailui.handler.*;
    import plugin.ems.handler.*;
    import plugin.fashen.handler.*;
    import plugin.fcm.handler.*;
    import plugin.findFriend.handler.*;
    import plugin.goddess.handler.*;
    import plugin.juezhan.handler.*;
    import plugin.kaifujingji.handler.*;
    import plugin.lianzhiexp.*;
    import plugin.mobai.handler.*;
    import plugin.newteam.handler.*;
    import plugin.newxunbao.handler.*;
    import plugin.platform.*;
    import plugin.roleN.handler.*;
    import plugin.shenzhuang.hander.*;
    import plugin.simpleChat.handler.*;
    import plugin.social.handler.*;
    import plugin.specialActivity.ShenMiShangDian.*;
    import plugin.stallage.handler.*;
    import plugin.store.*;
    import plugin.tracing.handler.*;
    import plugin.union.*;
    import plugin.unionChat.handler.*;
    import plugin.viproot.handler.*;
    import plugin.wajue.handler.*;
    import plugin.wing.handler.*;
    import plugin.xunbao.handler.*;
    import plugin.zbhsy.handler.*;
    import pluginfw.nio.handler.*;

    public class HandlerManager extends Object
    {
        private var _handlerDic:Object;
        private var _handler:Object;
        private static var _instance:HandlerManager;

        public function HandlerManager()
        {
            this._handler = new Object();
            return;
        }// end function

        public function addHandler(param1:String) : void
        {
            if (this._handlerDic == null)
            {
                this.registerHandler();
            }
            var _loc_2:* = PluginManager.instance.getGroupId(param1);
            var _loc_3:* = new this._handlerDic[param1];
            this._handler[param1] = _loc_3;
            Server.instance.addHandler(ConnectType.SYSTEM, _loc_2, _loc_3);
            return;
        }// end function

        public function hasgetHandler(param1:String) : Boolean
        {
            if (this._handlerDic == null)
            {
                this.registerHandler();
            }
            return this._handlerDic[param1];
        }// end function

        public function getHandler(param1:String) : Object
        {
            return this._handler[param1];
        }// end function

        public function registerHandler() : void
        {
            this._handlerDic = new Object();
            this._handlerDic["bag"] = BagGroupHandler;
            this._handlerDic["role"] = RoleNHandler;
            this._handlerDic["qianghua"] = QiangHuaHandler;
            this._handlerDic["team"] = NewTeamHandler;
            this._handlerDic["skill"] = NewSkillHandler;
            this._handlerDic["chatFlash"] = ChatFlashHandler;
            this._handlerDic["social"] = SocialHandler;
            this._handlerDic["simpleChat"] = SimpleChatHandler;
            this._handlerDic["unionChat"] = UnionChatHandler;
            this._handlerDic["tracing"] = TracingHandler;
            this._handlerDic["findFriend"] = FindFriendHandler;
            this._handlerDic["email"] = EmailGroupHandler;
            this._handlerDic["zhuansheng"] = ReinHandler;
            this._handlerDic["business"] = BusinessHandler;
            this._handlerDic["fashen"] = FaShenHandler;
            this._handlerDic["fcm"] = FcmGroupHandler;
            this._handlerDic["xunbao"] = XunbaoHandler;
            this._handlerDic["newxunbao"] = NewXunbaoHandler;
            this._handlerDic["baoshi"] = BaoShiHandler;
            this._handlerDic["stallage"] = StallageHandler;
            this._handlerDic["activity"] = ActivityHandler;
            this._handlerDic["online"] = OnlineHandler;
            this._handlerDic["bossChallenge"] = BossChallengeHandler;
            this._handlerDic["juezhan"] = JuezhanGroupHandler;
            this._handlerDic["wing"] = WingHandler;
            this._handlerDic["union"] = UnionGroupHandler;
            this._handlerDic["zbhsy"] = ZbhsyHandler;
            this._handlerDic["ems"] = EMSHandler;
            this._handlerDic["wajue"] = WaJueGroupHandler;
            this._handlerDic["achievement"] = AccompHandler;
            this._handlerDic["fashion"] = FashionHandler;
            this._handlerDic["mobai"] = MoBaiHandler;
            this._handlerDic["goddess"] = GoddessHandler;
            this._handlerDic["store"] = StoreGroupHandler;
            this._handlerDic["vip"] = VipHandler;
            this._handlerDic["kaifujingji"] = KaifuJJGroupHandler;
            this._handlerDic["lianzhiexp"] = LianzhiexpHandler;
            this._handlerDic["shenzhuang"] = ShenZhuangHander;
            this._handlerDic["platform"] = PlatformHandler;
            this._handlerDic["shenmishangdian"] = ShenMiShangDianHandler;
            this._handlerDic["feishen"] = FlyHandler;
            return;
        }// end function

        public static function get instance() : HandlerManager
        {
            var _loc_1:* = _instance || new HandlerManager;
            _instance = _instance || new HandlerManager;
            return _loc_1;
        }// end function

    }
}
